package com.offcn.user.feign;

import com.offcn.entity.Result;
import com.offcn.user.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("user")
@RequestMapping("/user")
public interface UserFeign {
    @GetMapping("/load/{username}")
    public Result<User> findUsername(@PathVariable String username);


    /***
     * 增加用户积分
     * @param points:要添加的积分
     */
    @GetMapping("/addPoints/{points}")
    public Result addPoints(@RequestParam(value = "points")Integer points);
}
